Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6934)

Unified Diff: chrome/test/data/webui/md_history/md_history_browsertest.js

Issue 2264983002: MD History: Lazily load element files which are not needed for first paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove flattenhtml, rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_history/md_history_browsertest.js
diff --git a/chrome/test/data/webui/md_history/md_history_browsertest.js b/chrome/test/data/webui/md_history/md_history_browsertest.js
index ce1c50ee3b5b80c4ab476670795787207d0b32c8..ee132c5ee98cec82084ab7b3565a29cfcd8cc50a 100644
--- a/chrome/test/data/webui/md_history/md_history_browsertest.js
+++ b/chrome/test/data/webui/md_history/md_history_browsertest.js
@@ -47,9 +47,11 @@ MaterialHistoryBrowserTest.prototype = {
suiteSetup(function() {
// Wait for the top-level app element to be upgraded.
- return waitForAppUpgrade().then(function() {
- $('history-app').queryState_.queryingDisabled = true;
- });
+ return waitForAppUpgrade()
+ .then(function() { return md_history.ensureLazyLoaded(); })
+ .then(function() {
+ $('history-app').queryState_.queryingDisabled = true;
+ });
});
},
};
@@ -137,19 +139,20 @@ MaterialHistoryWithQueryParamTest.prototype = {
/** @override */
setUp: function() {
PolymerTest.prototype.setUp.call(this);
+ // This message handler needs to be registered before the test since the
+ // query can happen immediately after the element is upgraded. However,
+ // since there may be a delay as well, the test might check the global var
+ // too early as well. In this case the test will have overtaken the
+ // callback.
+ registerMessageCallback('queryHistory', this, function (info) {
+ window.historyQueryInfo = info;
+ });
suiteSetup(function() {
- // This message handler needs to be registered before the test since the
- // query can happen immediately after the element is upgraded. However,
- // since there may be a delay as well, the test might check the global var
- // too early as well. In this case the test will have overtaken the
- // callback.
- registerMessageCallback('queryHistory', this, function (info) {
- window.historyQueryInfo = info;
- });
-
// Wait for the top-level app element to be upgraded.
- return waitForAppUpgrade();
+ return waitForAppUpgrade().then(function() {
+ md_history.ensureLazyLoaded();
+ });
});
},
};
« no previous file with comments | « chrome/test/data/webui/md_history/history_routing_test.js ('k') | tools/copyright_scanner/third_party_files_whitelist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698