Commit 2a564408 authored by dpapad's avatar dpapad Committed by Commit Bot

Settings: Port people_page/ interactive_ui_tests to Polymer3.

Bug: 1026426
Change-Id: I16c53dc810993f9cd1684ee735f5738a8aa91734
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2119795
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Auto-Submit: dpapad <dpapad@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753451}
parent 51f44b8e
......@@ -47,8 +47,11 @@ js2gtest("interactive_ui_tests_js_webui") {
"$root_gen_dir/chrome/test/data/webui/cr_elements/iron_list_focus_test.m.js",
"$root_gen_dir/chrome/test/data/webui/cr_focus_row_behavior_test.m.js",
"$root_gen_dir/chrome/test/data/webui/mock_controller.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/people_page_sync_page_interactive_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/settings_animated_pages_test.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/settings_ui_tests.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/sync_test_util.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/test_sync_browser_proxy.m.js",
"$root_gen_dir/chrome/test/data/webui/settings/test_util.m.js",
"$root_gen_dir/chrome/test/data/webui/test_browser_proxy.m.js",
"$root_gen_dir/chrome/test/data/webui/test_store.m.js",
......
......@@ -41,6 +41,7 @@ js_modulizer("modulize") {
"people_page_test.js",
"people_page_sync_controls_test.js",
"people_page_sync_page_test.js",
"people_page_sync_page_interactive_test.js",
"prefs_test_cases.js",
"prefs_tests.js",
"pref_util_tests.js",
......
......@@ -37,6 +37,18 @@ TEST_F('CrSettingsAnimatedPagesV3Test', 'All', function() {
mocha.run();
});
// eslint-disable-next-line no-var
var CrSettingsSyncPageV3Test = class extends CrSettingsV3InteractiveUITest {
/** @override */
get browsePreload() {
return 'chrome://settings/test_loader.html?module=settings/people_page_sync_page_interactive_test.m.js';
}
};
TEST_F('CrSettingsSyncPageV3Test', 'All', function() {
mocha.run();
});
// eslint-disable-next-line no-var
var SettingsUIV3InteractiveTest = class extends CrSettingsV3InteractiveUITest {
/** @override */
......
......@@ -2,6 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// clang-format off
// #import {SyncBrowserProxyImpl, Router} from 'chrome://settings/settings.js';
// #import 'chrome://settings/lazy_load.js';
// #import {setupRouterWithSyncRoutes} from 'chrome://test/settings/sync_test_util.m.js';
// #import {TestSyncBrowserProxy} from 'chrome://test/settings/test_sync_browser_proxy.m.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// #import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js';
// clang-format on
suite('sync-page-test', function() {
/** @type {SyncPageElement} */ let syncPage;
......@@ -9,7 +18,8 @@ suite('sync-page-test', function() {
sync_test_util.setupRouterWithSyncRoutes();
PolymerTest.clearBody();
settings.SyncBrowserProxyImpl.instance_ = new TestSyncBrowserProxy();
settings.Router.getInstance().navigateTo(settings.routes.SYNC);
const router = settings.Router.getInstance();
router.navigateTo(router.getRoutes().SYNC);
syncPage = document.createElement('settings-sync-page');
document.body.appendChild(syncPage);
Polymer.dom.flush();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment