| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 4 |
| 5 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 5 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Rewrite to use WebUI testing infrastructure. Current code below is mostly | 24 // Rewrite to use WebUI testing infrastructure. Current code below is mostly |
| 25 // testing how WebUI concrete class serializes function parameters, and that | 25 // testing how WebUI concrete class serializes function parameters, and that |
| 26 // SyncInternalsUI::HandleJSEvent/HandleJsReply prefix the given function with | 26 // SyncInternalsUI::HandleJSEvent/HandleJsReply prefix the given function with |
| 27 // "chrome.sync." and postfix it with ".fire" or ".handleReply". | 27 // "chrome.sync." and postfix it with ".fire" or ".handleReply". |
| 28 // http://crbug.com/110517 | 28 // http://crbug.com/110517 |
| 29 /* | 29 /* |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 using browser_sync::HasArgsAsList; | 33 using browser_sync::HasArgsAsList; |
| 34 using csync::JsArgList; | 34 using syncer::JsArgList; |
| 35 using csync::JsEventDetails; | 35 using syncer::JsEventDetails; |
| 36 using content::BrowserThread; | 36 using content::BrowserThread; |
| 37 using content::WebContents; | 37 using content::WebContents; |
| 38 using testing::_; | 38 using testing::_; |
| 39 using testing::Mock; | 39 using testing::Mock; |
| 40 using testing::NiceMock; | 40 using testing::NiceMock; |
| 41 using testing::Return; | 41 using testing::Return; |
| 42 using testing::StrictMock; | 42 using testing::StrictMock; |
| 43 | 43 |
| 44 // Subclass of WebUI to mock out ExecuteJavascript. | 44 // Subclass of WebUI to mock out ExecuteJavascript. |
| 45 class TestSyncWebUI: public WebUI { | 45 class TestSyncWebUI: public WebUI { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 ExecuteJavascript(ASCIIToUTF16(kAboutInfoCall))); | 210 ExecuteJavascript(ASCIIToUTF16(kAboutInfoCall))); |
| 211 | 211 |
| 212 ListValue args; | 212 ListValue args; |
| 213 sync_internals_ui_->OverrideHandleWebUIMessage( | 213 sync_internals_ui_->OverrideHandleWebUIMessage( |
| 214 GURL(), "getAboutInfo", args); | 214 GURL(), "getAboutInfo", args); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace | 217 } // namespace |
| 218 | 218 |
| 219 */ | 219 */ |
| OLD | NEW |