Skip to content

Commit

Permalink
Multidevice: Fix failing MultiDeviceSetupBrowserTest.* for Polymer 2.
Browse files Browse the repository at this point in the history
Removes /deep/ usage, which no longer works in Shadow DOM v1. Also fixes
some test timing that caused part of the failures.

Bug: 875505,860069
Change-Id: I5642105a6df148bdea2d02b8e1af8889f400c89d
Reviewed-on: https://chromium-review.googlesource.com/1217026
Reviewed-by: Kyle Horimoto <[email protected]>
Commit-Queue: Demetrios Papadopoulos <[email protected]>
Cr-Commit-Position: refs/heads/master@{#590171}
  • Loading branch information
freshp86 authored and Commit Bot committed Sep 11, 2018
1 parent 8f503f7 commit 00f8d38
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
18 changes: 12 additions & 6 deletions chrome/test/data/webui/multidevice_setup/integration_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ cr.define('multidevice_setup', () => {
multiDeviceSetupElement.uiMode = multidevice_setup.UiMode.POST_OOBE;

document.body.appendChild(multiDeviceSetupElement);
forwardButton =
multiDeviceSetupElement.$$('button-bar /deep/ #forward');
forwardButton = multiDeviceSetupElement.$$('button-bar').$$('#forward');
backwardButton =
multiDeviceSetupElement.$$('button-bar /deep/ #backward');
multiDeviceSetupElement.$$('button-bar').$$('#backward');
});

/** @param {string} visiblePageName */
Expand All @@ -51,7 +50,10 @@ cr.define('multidevice_setup', () => {
test('SetupSucceededPage forward button closes UI', done => {
setVisiblePage(SUCCESS);
multiDeviceSetupElement.addEventListener('setup-exited', () => done());
forwardButton.click();

multiDeviceSetupElement.async(() => {
forwardButton.click();
});
});

// From StartSetupPage
Expand Down Expand Up @@ -85,7 +87,9 @@ cr.define('multidevice_setup', () => {
true;
multiDeviceSetupElement.uiMode = multidevice_setup.UiMode.OOBE;

forwardButton.click();
multiDeviceSetupElement.async(() => {
forwardButton.click();
});
});

// Post-OOBE
Expand Down Expand Up @@ -125,7 +129,9 @@ cr.define('multidevice_setup', () => {
true;
multiDeviceSetupElement.uiMode = multidevice_setup.UiMode.POST_OOBE;

forwardButton.click();
multiDeviceSetupElement.async(() => {
forwardButton.click();
});
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cr.define('multidevice_setup', () => {

let selectOptionByTextContent = function(optionText) {
const optionNodeList =
startSetupPageElement.querySelectorAll('* /deep/ option');
startSetupPageElement.$.deviceDropdown.querySelectorAll('option');
for (option of optionNodeList.values()) {
if (option.textContent.trim() == optionText) {
MockInteractions.tap(option);
Expand All @@ -60,7 +60,8 @@ cr.define('multidevice_setup', () => {
'Finding devices populates dropdown and defines selected device',
() => {
assertEquals(
startSetupPageElement.querySelectorAll('* /deep/ option')
startSetupPageElement.$.deviceDropdown
.querySelectorAll('option')
.length,
DEVICES.length);
assertEquals(startSetupPageElement.selectedDeviceId, 'abcdxl');
Expand Down
5 changes: 1 addition & 4 deletions testing/buildbot/filters/webui_polymer2_browser_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@
-DemoSetupTest.OnlineSetupFlowSuccess
-DemoSetupTest.ShowOfflineSetupOptionOnNetworkList
-EulaTest.LoadOffline
-MultiDeviceSetupBrowserTest.Integration
-MultiDeviceSetupBrowserTest.StartSetupPage
-OpenAudioFiles/FilesAppBrowserTest.Test/audioOpenDownloads
-OpenAudioFiles/FilesAppBrowserTest.Test/audioOpenDownloads_GuestMode
-OpenAudioFiles/FilesAppBrowserTest.Test/audioOpenDrive
Expand Down Expand Up @@ -296,8 +294,7 @@ MediaRouterElementsBrowserTest.MediaRouterHeader
Mock4JSWebUITest.*
Mock4JSWebUITest.*
Mock4JSWebUITestFails.*
MultiDeviceSetupBrowserTest.Integration
MultiDeviceSetupBrowserTest.SetupSucceededPage
MultiDeviceSetupBrowserTest.*
MultiProfileDriveFileSystemExtensionApiTest.*
MultiProfileFilesAppBrowserTest.*
NetInternalsTest.*
Expand Down

0 comments on commit 00f8d38

Please sign in to comment.