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

Unified Diff: tools/perf/core/minidump_unittest.py

Issue 2184263004: Integration test for minidump paths, adding in wait time to make sure the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/core/minidump_unittest.py
diff --git a/tools/perf/core/minidump_unittest.py b/tools/perf/core/minidump_unittest.py
index bc3dfe09ec7a3603a1d6ad986edb50694e5aefa0..893813f571dda406c9a029ff34b99757e43854f7 100644
--- a/tools/perf/core/minidump_unittest.py
+++ b/tools/perf/core/minidump_unittest.py
@@ -12,6 +12,8 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
@decorators.Isolated
@decorators.Enabled('mac')
def testSymbolizeMinidump(self):
+ # Wait for the browser to restart fully before crashing
+ self._loadPageAndWait('var sam = "car";', 'sam')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
crash_minidump_path = self._browser.GetMostRecentMinidumpPath()
self.assertIsNotNone(crash_minidump_path)
@@ -39,6 +41,8 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
@decorators.Isolated
@decorators.Enabled('mac')
def testMultipleCrashMinidumps(self):
+ # Wait for the browser to restart fully before crashing
+ self._loadPageAndWait('var cat = "dog";', 'cat')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
first_crash_path = self._browser.GetMostRecentMinidumpPath()
@@ -59,12 +63,7 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
self._RestartBrowser()
# Start a new tab in the restarted browser
- new_tab = self._browser.tabs.New()
- new_tab.Navigate('http://www.google.com/',
- script_to_evaluate_on_commit='var foo = "bar";')
- # Wait until the javascript has run ensuring that
- # the new browser has restarted before we crash it again
- util.WaitFor(lambda: new_tab.EvaluateJavaScript('foo'), 60)
+ self._loadPageAndWait('var foo = "bar";', 'foo')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
second_crash_path = self._browser.GetMostRecentMinidumpPath()
@@ -100,3 +99,11 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
+ ''.join(after_symbolize_all_unsymbolized_paths))
#self.assertEquals(after_symbolize_all_unsymbolized_paths,
# [first_crash_path])
+
+ def _loadPageAndWait(self, script, value):
nednguyen 2016/07/28 15:44:47 nits: _LoadPageThenWait(self, script, value): Our
eyaich 2016/07/28 15:55:52 Done.
+ new_tab = self._browser.tabs.New()
+ new_tab.Navigate('http://www.google.com/',
nednguyen 2016/07/28 15:44:48 http://www.google.com would probably hit real netw
eyaich 2016/07/28 15:55:52 I think we actually want to hit a real web page an
eyaich 2016/07/28 16:59:02 Talked offline, I have changed this now. Done.
+ script_to_evaluate_on_commit=script)
+ # Wait until the javascript has run ensuring that
+ # the new browser has restarted before we crash it again
+ util.WaitFor(lambda: new_tab.EvaluateJavaScript(value), 60)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698