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

Side by Side Diff: tools/perf/profile_creators/cookie_profile_extender.py

Issue 1123843002: Disable failing perf unit tests on chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import multiprocessing 4 import multiprocessing
5 import os 5 import os
6 import sqlite3 6
7 try:
8 import sqlite3 # Not present on ChromeOS DUT.
9 except ImportError:
10 pass
7 11
8 import page_sets 12 import page_sets
9 13
10 from profile_creators import fast_navigation_profile_extender 14 from profile_creators import fast_navigation_profile_extender
11 15
12 class CookieProfileExtender( 16 class CookieProfileExtender(
13 fast_navigation_profile_extender.FastNavigationProfileExtender): 17 fast_navigation_profile_extender.FastNavigationProfileExtender):
14 """This extender fills in the cookie database. 18 """This extender fills in the cookie database.
15 19
16 By default, Chrome purges the cookie DB down to 3300 cookies. However, it 20 By default, Chrome purges the cookie DB down to 3300 cookies. However, it
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 that this method will return a false negative.""" 82 that this method will return a false negative."""
79 cookie_db_path = os.path.join(self.profile_path, "Default", "Cookies") 83 cookie_db_path = os.path.join(self.profile_path, "Default", "Cookies")
80 try: 84 try:
81 cookie_count = CookieProfileExtender._CookieCountInDB(cookie_db_path) 85 cookie_count = CookieProfileExtender._CookieCountInDB(cookie_db_path)
82 except sqlite3.OperationalError: 86 except sqlite3.OperationalError:
83 # There will occasionally be contention for the SQLite database. This 87 # There will occasionally be contention for the SQLite database. This
84 # shouldn't happen often, so ignore the errors. 88 # shouldn't happen often, so ignore the errors.
85 return False 89 return False
86 90
87 return cookie_count > CookieProfileExtender._COOKIE_DB_EXPECTED_SIZE 91 return cookie_count > CookieProfileExtender._COOKIE_DB_EXPECTED_SIZE
OLDNEW
« no previous file with comments | « tools/perf/measurements/thread_times_unittest.py ('k') | tools/perf/profile_creators/cookie_profile_extender_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698