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

Side by Side Diff: chrome/browser/ui/webui/web_ui_browsertest.cc

Issue 10067033: RefCounted types should not have public destructors, chrome/browser/ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/ui/webui/web_ui_browsertest.h" 4 #include "chrome/browser/ui/webui/web_ui_browsertest.h"
5 5
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // DataSource for the dummy URL. If no data source is provided then an error 246 // DataSource for the dummy URL. If no data source is provided then an error
247 // page is shown. While this doesn't matter for most tests, without it, 247 // page is shown. While this doesn't matter for most tests, without it,
248 // navigation to different anchors cannot be listened to (via the hashchange 248 // navigation to different anchors cannot be listened to (via the hashchange
249 // event). 249 // event).
250 class MockWebUIDataSource : public ChromeURLDataManager::DataSource { 250 class MockWebUIDataSource : public ChromeURLDataManager::DataSource {
251 public: 251 public:
252 MockWebUIDataSource() 252 MockWebUIDataSource()
253 : ChromeURLDataManager::DataSource("dummyurl", MessageLoop::current()) {} 253 : ChromeURLDataManager::DataSource("dummyurl", MessageLoop::current()) {}
254 254
255 private: 255 private:
256 virtual ~MockWebUIDataSource() {}
257
256 virtual void StartDataRequest(const std::string& path, 258 virtual void StartDataRequest(const std::string& path,
257 bool is_incognito, 259 bool is_incognito,
258 int request_id) OVERRIDE { 260 int request_id) OVERRIDE {
259 std::string dummy_html = "<html><body>Dummy</body></html>"; 261 std::string dummy_html = "<html><body>Dummy</body></html>";
260 scoped_refptr<base::RefCountedString> response = 262 scoped_refptr<base::RefCountedString> response =
261 base::RefCountedString::TakeString(&dummy_html); 263 base::RefCountedString::TakeString(&dummy_html);
262 SendResponse(request_id, response); 264 SendResponse(request_id, response);
263 } 265 }
264 266
265 std::string GetMimeType(const std::string& path) const OVERRIDE { 267 std::string GetMimeType(const std::string& path) const OVERRIDE {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 // testDone directly and expect pass result. 688 // testDone directly and expect pass result.
687 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 689 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
688 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 690 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
689 } 691 }
690 692
691 // Test that calling testDone during RunJavascriptTest still completes when 693 // Test that calling testDone during RunJavascriptTest still completes when
692 // waiting for async result. 694 // waiting for async result.
693 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 695 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
694 ASSERT_TRUE(RunJavascriptTest("testDone")); 696 ASSERT_TRUE(RunJavascriptTest("testDone"));
695 } 697 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698