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

Unified Diff: chrome/test/base/test_tab_strip_model_observer.h

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rename ReloadCloudPrintersList to ReloadPrintersList Created 9 years, 2 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/base/test_tab_strip_model_observer.h
===================================================================
--- chrome/test/base/test_tab_strip_model_observer.h (revision 105826)
+++ chrome/test/base/test_tab_strip_model_observer.h (working copy)
@@ -12,13 +12,13 @@
class TabStripModel;
-// In order to support testing of print preview, we need to wait for the tab to
-// be inserted, and then observe notifications on the newly added tab's
-// controller to wait for it to be loaded. To support tests registering
-// javascript WebUI handlers, we need to inject the framework & registration
-// javascript before the webui page loads by calling back through the
-// TestTabStripModelObserver::LoadStartObserver when the new page starts
-// loading.
+// In order to support testing of print preview, we need to wait for the
+// constrained window to block the current tab, and then observe notifications
+// on the newly added tab's controller to wait for it to be loaded.
+// To support tests registering javascript WebUI handlers, we need to inject
+// the framework & registration javascript before the webui page loads by
+// calling back through the TestTabStripModelObserver::LoadStartObserver when
+// the new page starts loading.
class TestTabStripModelObserver : public TestNavigationObserver,
public TabStripModelObserver {
public:
@@ -30,9 +30,12 @@
virtual ~TestTabStripModelObserver();
private:
+ // Callback to observer the print preview tab associated with |contents|.
+ void ObservePrintPreviewTabContents(TabContentsWrapper* contents);
+
// TabStripModelObserver:
- virtual void TabInsertedAt(TabContentsWrapper* contents, int index,
- bool foreground) OVERRIDE;
+ virtual void TabBlockedStateChanged(TabContentsWrapper* contents,
+ int index) OVERRIDE;
// |tab_strip_model_| is the object this observes. The constructor will
// register this as an observer, and the destructor will remove the observer.

Powered by Google App Engine
This is Rietveld 408576698