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

Unified Diff: chrome/browser/ui/webui/sync_internals_ui_unittest.cc

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | « chrome/browser/ui/webui/sync_internals_ui.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_internals_ui_unittest.cc
===================================================================
--- chrome/browser/ui/webui/sync_internals_ui_unittest.cc (revision 117388)
+++ chrome/browser/ui/webui/sync_internals_ui_unittest.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/profile_mock.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/web_ui_controller.h"
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -121,7 +122,8 @@
EXPECT_CALL(mock_js_controller_,
ProcessJsMessage(name, HasArgsAsList(args), _));
- test_sync_internals_ui_->OnWebUISend(GURL(), name, args);
+ test_sync_internals_ui_->controller()->OverrideHandleWebUIMessage(
+ GURL(), name, args);
}
// Tests with NULL ProfileSyncService.
@@ -183,7 +185,8 @@
args.Append(Value::CreateIntegerValue(5));
// Should drop the message.
- test_sync_internals_ui_->OnWebUISend(GURL(), name, args);
+ test_sync_internals_ui_->controller()->OverrideHandleWebUIMessage(
+ GURL(), name, args);
}
// TODO(lipalani) - add a test case to test about:sync with a non null
@@ -195,7 +198,8 @@
ExecuteJavascript(ASCIIToUTF16(kAboutInfoCall)));
ListValue args;
- test_sync_internals_ui_->OnWebUISend(GURL(), "getAboutInfo", args);
+ test_sync_internals_ui_->controller()->OverrideHandleWebUIMessage(
+ GURL(), "getAboutInfo", args);
}
} // namespace
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_ui.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698