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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/chrome_frame_automation_mock.cc
===================================================================
--- chrome_frame/test/chrome_frame_automation_mock.cc (revision 0)
+++ chrome_frame/test/chrome_frame_automation_mock.cc (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome_frame/test/chrome_frame_automation_mock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+const int kLongWaitTimeout = 25 * 1000;
+const int kShortWaitTimeout = 5 * 1000;
+
+TEST(ChromeFrame, Launch) {
+ MessageLoopForUI loop;
+ AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout);
+
+ mock_launch.Navigate("about:blank");
+ loop.Run(NULL);
+ EXPECT_EQ(true, mock_launch.launch_result());
+}
+
+TEST(ChromeFrame, Navigate) {
+ MessageLoopForUI loop;
+ AutomationMockNavigate mock_navigate(&loop, kLongWaitTimeout);
+
+ mock_navigate.NavigateRelativeFile(L"postmessage_basic_frame.html");
+ loop.Run(NULL);
+ EXPECT_EQ(true, mock_navigate.navigation_result());
+}
+
+TEST(ChromeFrame, PostMessage) {
+ MessageLoopForUI loop;
+ AutomationMockPostMessage mock_postmessage(&loop, kLongWaitTimeout);
+
+ mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html");
+ loop.Run(NULL);
+ EXPECT_EQ(true, mock_postmessage.postmessage_result());
+}
+
+TEST(ChromeFrame, RequestStart) {
+ MessageLoopForUI loop;
+ AutomationMockHostNetworkRequestStart mock_request_start(&loop,
+ kLongWaitTimeout);
+
+ mock_request_start.NavigateRelative(L"postmessage_basic_frame.html");
+ loop.Run(NULL);
+ EXPECT_EQ(true, mock_request_start.request_start_result());
+}
+
« 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