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

Unified Diff: telemetry/telemetry/page/cache_temperature_unittest.py

Issue 1964843002: SharedPageState ensures specified page cache temperature. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: add smoketestws Created 4 years, 7 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
« no previous file with comments | « telemetry/telemetry/page/cache_temperature.py ('k') | telemetry/telemetry/page/shared_page_state.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/page/cache_temperature_unittest.py
diff --git a/telemetry/telemetry/page/cache_temperature_unittest.py b/telemetry/telemetry/page/cache_temperature_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..cc5cb1f353c26bb8a9ac38601ccba44b9bb51de4
--- /dev/null
+++ b/telemetry/telemetry/page/cache_temperature_unittest.py
@@ -0,0 +1,44 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from telemetry import decorators
+from telemetry import page as page_module
+from telemetry import story
+from telemetry.page import cache_temperature
+from telemetry.testing import browser_test_case
+
+class CacheTempeartureTests(browser_test_case.BrowserTestCase):
+ @decorators.Enabled('has tabs')
+ def testEnsureAny(self):
+ story_set = story.StorySet()
+ page = page_module.Page('http://google.com', page_set=story_set,
+ cache_temperature=cache_temperature.ANY)
+ cache_temperature.EnsurePageCacheTemperature(page, self._browser)
+
+ @decorators.Enabled('has tabs')
+ def testEnsurePCv1Cold(self):
+ story_set = story.StorySet()
+ page = page_module.Page('http://google.com', page_set=story_set,
+ cache_temperature=cache_temperature.PCV1_COLD)
+ cache_temperature.EnsurePageCacheTemperature(page, self._browser)
+
+ @decorators.Enabled('has tabs')
+ def testEnsurePCv1WarmAfterPCv1ColdRun(self):
+ story_set = story.StorySet()
+ page = page_module.Page('http://google.com', page_set=story_set,
+ cache_temperature=cache_temperature.PCV1_COLD)
+ cache_temperature.EnsurePageCacheTemperature(page, self._browser)
+
+ previous_page = page
+ page = page_module.Page('http://google.com', page_set=story_set,
+ cache_temperature=cache_temperature.PCV1_WARM)
+ cache_temperature.EnsurePageCacheTemperature(page, self._browser,
+ previous_page)
+
+ @decorators.Enabled('has tabs')
+ def testEnsurePCv1WarmFromScratch(self):
+ story_set = story.StorySet()
+ page = page_module.Page('http://google.com', page_set=story_set,
+ cache_temperature=cache_temperature.PCV1_WARM)
+ cache_temperature.EnsurePageCacheTemperature(page, self._browser)
« no previous file with comments | « telemetry/telemetry/page/cache_temperature.py ('k') | telemetry/telemetry/page/shared_page_state.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698