| OLD | NEW |
| 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 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4674 FrameTestHelpers::WebViewHelper webViewHelper(this); | 4674 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 4675 webViewHelper.initialize(true, 0, &fakeSelectionWebViewClient); | 4675 webViewHelper.initialize(true, 0, &fakeSelectionWebViewClient); |
| 4676 webViewHelper.webView()->settings()->setDefaultFontSize(12); | 4676 webViewHelper.webView()->settings()->setDefaultFontSize(12); |
| 4677 webViewHelper.webView()->setDefaultPageScaleLimits(1, 1); | 4677 webViewHelper.webView()->setDefaultPageScaleLimits(1, 1); |
| 4678 webViewHelper.resize(WebSize(viewWidth, viewHeight)); | 4678 webViewHelper.resize(WebSize(viewWidth, viewHeight)); |
| 4679 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL
+ "select_range_basic.html"); | 4679 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL
+ "select_range_basic.html"); |
| 4680 | 4680 |
| 4681 // The frame starts with no selection. | 4681 // The frame starts with no selection. |
| 4682 WebFrame* frame = webViewHelper.webView()->mainFrame(); | 4682 WebFrame* frame = webViewHelper.webView()->mainFrame(); |
| 4683 ASSERT_TRUE(frame->hasSelection()); | 4683 ASSERT_TRUE(frame->hasSelection()); |
| 4684 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); | 4684 EXPECT_FALSE(fakeSelectionLayerTreeView.selection()); |
| 4685 | 4685 |
| 4686 // The selection cleared notification should be triggered upon layout. | 4686 // The selection cleared notification should be triggered upon layout. |
| 4687 frame->executeCommand(WebString::fromUTF8("Unselect")); | 4687 frame->executeCommand(WebString::fromUTF8("Unselect")); |
| 4688 ASSERT_FALSE(frame->hasSelection()); | 4688 ASSERT_FALSE(frame->hasSelection()); |
| 4689 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); | 4689 EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); |
| 4690 webViewHelper.webView()->updateAllLifecyclePhases(); | 4690 webViewHelper.webView()->updateAllLifecyclePhases(); |
| 4691 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); | 4691 EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); |
| 4692 | 4692 |
| 4693 frame->executeCommand(WebString::fromUTF8("SelectAll")); | 4693 frame->executeCommand(WebString::fromUTF8("SelectAll")); |
| 4694 webViewHelper.webView()->updateAllLifecyclePhases(); | 4694 webViewHelper.webView()->updateAllLifecyclePhases(); |
| (...skipping 3712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8407 } | 8407 } |
| 8408 | 8408 |
| 8409 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) | 8409 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) |
| 8410 { | 8410 { |
| 8411 swapLocalFrameToRemoteFrame(); | 8411 swapLocalFrameToRemoteFrame(); |
| 8412 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p
arentElement.style.display = 'none';")); | 8412 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p
arentElement.style.display = 'none';")); |
| 8413 EXPECT_FALSE(remoteFrameClient()->isVisible()); | 8413 EXPECT_FALSE(remoteFrameClient()->isVisible()); |
| 8414 } | 8414 } |
| 8415 | 8415 |
| 8416 } // namespace blink | 8416 } // namespace blink |
| OLD | NEW |