| 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 4601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4612 ~CompositedSelectionBoundsTestLayerTreeView() override { } | 4612 ~CompositedSelectionBoundsTestLayerTreeView() override { } |
| 4613 | 4613 |
| 4614 void registerSelection(const WebSelection& selection) override | 4614 void registerSelection(const WebSelection& selection) override |
| 4615 { | 4615 { |
| 4616 m_selection = adoptPtr(new WebSelection(selection)); | 4616 m_selection = adoptPtr(new WebSelection(selection)); |
| 4617 } | 4617 } |
| 4618 | 4618 |
| 4619 void clearSelection() override | 4619 void clearSelection() override |
| 4620 { | 4620 { |
| 4621 m_selectionCleared = true; | 4621 m_selectionCleared = true; |
| 4622 m_selection.clear(); | 4622 m_selection.reset(); |
| 4623 } | 4623 } |
| 4624 | 4624 |
| 4625 bool getAndResetSelectionCleared() | 4625 bool getAndResetSelectionCleared() |
| 4626 { | 4626 { |
| 4627 bool selectionCleared = m_selectionCleared; | 4627 bool selectionCleared = m_selectionCleared; |
| 4628 m_selectionCleared = false; | 4628 m_selectionCleared = false; |
| 4629 return selectionCleared; | 4629 return selectionCleared; |
| 4630 } | 4630 } |
| 4631 | 4631 |
| 4632 const WebSelection* selection() const { return m_selection.get(); } | 4632 const WebSelection* selection() const { return m_selection.get(); } |
| (...skipping 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8684 WebLocalFrame* mainFrame = helper.webView()->mainFrame()->toWebLocalFrame(); | 8684 WebLocalFrame* mainFrame = helper.webView()->mainFrame()->toWebLocalFrame(); |
| 8685 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 8685 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 8686 mainFrame->executeScript(WebScriptSource("hello = 'world';")); | 8686 mainFrame->executeScript(WebScriptSource("hello = 'world';")); |
| 8687 FrameTestHelpers::loadFrame(mainFrame, "data:text/html,new page"); | 8687 FrameTestHelpers::loadFrame(mainFrame, "data:text/html,new page"); |
| 8688 v8::Local<v8::Value> result = mainFrame->executeScriptAndReturnValue(WebScri
ptSource("hello")); | 8688 v8::Local<v8::Value> result = mainFrame->executeScriptAndReturnValue(WebScri
ptSource("hello")); |
| 8689 ASSERT_TRUE(result->IsString()); | 8689 ASSERT_TRUE(result->IsString()); |
| 8690 EXPECT_EQ("world", toCoreString(result->ToString(mainFrame->mainWorldScriptC
ontext()).ToLocalChecked())); | 8690 EXPECT_EQ("world", toCoreString(result->ToString(mainFrame->mainWorldScriptC
ontext()).ToLocalChecked())); |
| 8691 } | 8691 } |
| 8692 | 8692 |
| 8693 } // namespace blink | 8693 } // namespace blink |
| OLD | NEW |