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

Unified Diff: tools/telemetry/telemetry/core/browser_unittest.py

Issue 14359012: Telemetry: Add option to create a dirty profile as part of a test run (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix to unit tests Created 7 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
Index: tools/telemetry/telemetry/core/browser_unittest.py
diff --git a/tools/telemetry/telemetry/core/browser_unittest.py b/tools/telemetry/telemetry/core/browser_unittest.py
index 0d315e9d3b0bedd6fdc94afd3060cf36a17e0080..3a07244e8c928b49a192c807e8777ade629f3337 100644
--- a/tools/telemetry/telemetry/core/browser_unittest.py
+++ b/tools/telemetry/telemetry/core/browser_unittest.py
@@ -1,6 +1,7 @@
# Copyright (c) 2012 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.
+import logging
import unittest
from telemetry.core import browser_finder
@@ -83,3 +84,19 @@ class BrowserTest(unittest.TestCase):
tab.Navigate('http://www.google.com/')
tab.Close()
self.assertEquals(1, len(b.tabs))
+
+ def testDirtyProfileCreation(self):
+ options = options_for_unittests.GetCopy()
+
+ # Dirty profile creation is currently only implemented on Desktop.
+ is_running_on_desktop = not (
+ options.browser_type.startswith('android') or
+ options.browser_type.startswith('cros'))
+ if not is_running_on_desktop:
+ logging.warn("Desktop-only test, skipping.")
+ return
+
+ options.profile_type = 'small_profile'
+ browser_to_create = browser_finder.FindBrowser(options)
+ with browser_to_create.Create() as b:
+ self.assertEquals(1, len(b.tabs))
« no previous file with comments | « tools/telemetry/telemetry/core/browser_options.py ('k') | tools/telemetry/telemetry/core/chrome/android_browser_finder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698