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

Side by Side Diff: chrome_frame/test/chrome_frame_automation_mock.cc

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome_frame/test/chrome_frame_automation_mock.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 const int kLongWaitTimeout = 25 * 1000;
9 const int kShortWaitTimeout = 5 * 1000;
10
11 TEST(ChromeFrame, Launch) {
12 MessageLoopForUI loop;
13 AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout);
14
15 mock_launch.Navigate("about:blank");
16 loop.Run(NULL);
17 EXPECT_EQ(true, mock_launch.launch_result());
18 }
19
20 TEST(ChromeFrame, Navigate) {
21 MessageLoopForUI loop;
22 AutomationMockNavigate mock_navigate(&loop, kLongWaitTimeout);
23
24 mock_navigate.NavigateRelativeFile(L"postmessage_basic_frame.html");
25 loop.Run(NULL);
26 EXPECT_EQ(true, mock_navigate.navigation_result());
27 }
28
29 TEST(ChromeFrame, PostMessage) {
30 MessageLoopForUI loop;
31 AutomationMockPostMessage mock_postmessage(&loop, kLongWaitTimeout);
32
33 mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html");
34 loop.Run(NULL);
35 EXPECT_EQ(true, mock_postmessage.postmessage_result());
36 }
37
38 TEST(ChromeFrame, RequestStart) {
39 MessageLoopForUI loop;
40 AutomationMockHostNetworkRequestStart mock_request_start(&loop,
41 kLongWaitTimeout);
42
43 mock_request_start.NavigateRelative(L"postmessage_basic_frame.html");
44 loop.Run(NULL);
45 EXPECT_EQ(true, mock_request_start.request_start_result());
46 }
47
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.h ('k') | chrome_frame/test/chrome_frame_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698