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

Side by Side Diff: webkit/tools/test_shell/test_shell_test.cc

Issue 10869073: Split user agent code out of the 'glue' target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add new test file to patch Created 8 years, 3 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
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 4
5 #include "webkit/tools/test_shell/test_shell_test.h" 5 #include "webkit/tools/test_shell/test_shell_test.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "net/base/net_util.h" 16 #include "net/base/net_util.h"
17 #include "webkit/glue/user_agent.h" 17 #include "webkit/glue/user_agent.h"
18 #include "webkit/glue/webkit_glue.h"
19 18
20 GURL TestShellTest::GetTestURL(const FilePath& test_case_path, 19 GURL TestShellTest::GetTestURL(const FilePath& test_case_path,
21 const std::string& test_case) { 20 const std::string& test_case) {
22 return net::FilePathToFileURL(test_case_path.AppendASCII(test_case)); 21 return net::FilePathToFileURL(test_case_path.AppendASCII(test_case));
23 } 22 }
24 23
25 void TestShellTest::SetUp() { 24 void TestShellTest::SetUp() {
26 // Make a test shell for use by the test. 25 // Make a test shell for use by the test.
27 CreateEmptyWindow(); 26 CreateEmptyWindow();
28 test_shell_->Show(WebKit::WebNavigationPolicyNewWindow); 27 test_shell_->Show(WebKit::WebNavigationPolicyNewWindow);
(...skipping 12 matching lines...) Expand all
41 test_shell_->LoadURL(GURL("about:blank")); 40 test_shell_->LoadURL(GURL("about:blank"));
42 test_shell_->DestroyWindow(test_shell_->mainWnd()); 41 test_shell_->DestroyWindow(test_shell_->mainWnd());
43 42
44 // Flush the MessageLoop of any residual tasks. 43 // Flush the MessageLoop of any residual tasks.
45 MessageLoop::current()->RunAllPending(); 44 MessageLoop::current()->RunAllPending();
46 } 45 }
47 46
48 void TestShellTest::CreateEmptyWindow() { 47 void TestShellTest::CreateEmptyWindow() {
49 TestShell::CreateNewWindow(GURL("about:blank"), &test_shell_); 48 TestShell::CreateNewWindow(GURL("about:blank"), &test_shell_);
50 } 49 }
OLDNEW
« webkit/glue/user_agent_unittest.cc ('K') | « webkit/tools/test_shell/test_shell_request_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698