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

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 595713002: Move local frame-only methods out of WebFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more Created 6 years, 2 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 | « Source/web/WebRemoteFrameImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 4077 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 void runTest(const char* testFile) 4088 void runTest(const char* testFile)
4089 { 4089 {
4090 registerMockedHttpURLLoad(testFile); 4090 registerMockedHttpURLLoad(testFile);
4091 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(), m_ba seURL + testFile); 4091 FrameTestHelpers::loadFrame(m_webViewHelper.webView()->mainFrame(), m_ba seURL + testFile);
4092 m_webViewHelper.webView()->layout(); 4092 m_webViewHelper.webView()->layout();
4093 4093
4094 const WebSelectionBound* selectStart = m_fakeSelectionLayerTreeView.star t(); 4094 const WebSelectionBound* selectStart = m_fakeSelectionLayerTreeView.star t();
4095 const WebSelectionBound* selectEnd = m_fakeSelectionLayerTreeView.end(); 4095 const WebSelectionBound* selectEnd = m_fakeSelectionLayerTreeView.end();
4096 4096
4097 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 4097 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
4098 v8::Handle<v8::Value> result = m_webViewHelper.webView()->mainFrame()->e xecuteScriptAndReturnValueForTests(WebScriptSource("expectedResult")); 4098 v8::Handle<v8::Value> result = m_webViewHelper.webView()->mainFrame()->t oWebLocalFrame()->executeScriptAndReturnValueForTests(WebScriptSource("expectedR esult"));
4099 if (result.IsEmpty() || (*result)->IsUndefined()) { 4099 if (result.IsEmpty() || (*result)->IsUndefined()) {
4100 EXPECT_FALSE(selectStart); 4100 EXPECT_FALSE(selectStart);
4101 EXPECT_FALSE(selectEnd); 4101 EXPECT_FALSE(selectEnd);
4102 return; 4102 return;
4103 } 4103 }
4104 4104
4105 ASSERT_TRUE(selectStart); 4105 ASSERT_TRUE(selectStart);
4106 ASSERT_TRUE(selectEnd); 4106 ASSERT_TRUE(selectEnd);
4107 4107
4108 ASSERT_TRUE((*result)->IsArray()); 4108 ASSERT_TRUE((*result)->IsArray());
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
6346 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6346 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6347 6347
6348 // Neither should a page reload. 6348 // Neither should a page reload.
6349 localFrame->reload(); 6349 localFrame->reload();
6350 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6350 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6351 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6351 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6352 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6352 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6353 } 6353 }
6354 6354
6355 } // namespace 6355 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698