| 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 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2138 | 2138 |
| 2139 bool findResultsAreReady() const { return m_findResultsAreReady; } | 2139 bool findResultsAreReady() const { return m_findResultsAreReady; } |
| 2140 int count() const { return m_count; } | 2140 int count() const { return m_count; } |
| 2141 | 2141 |
| 2142 private: | 2142 private: |
| 2143 bool m_findResultsAreReady; | 2143 bool m_findResultsAreReady; |
| 2144 int m_count; | 2144 int m_count; |
| 2145 }; | 2145 }; |
| 2146 | 2146 |
| 2147 // This fails on Mac https://bugs.webkit.org/show_bug.cgi?id=108574 | 2147 // This fails on Mac https://bugs.webkit.org/show_bug.cgi?id=108574 |
| 2148 #if OS(DARWIN) | 2148 #if OS(MACOSX) |
| 2149 TEST_F(WebFrameTest, DISABLED_FindInPageMatchRects) | 2149 TEST_F(WebFrameTest, DISABLED_FindInPageMatchRects) |
| 2150 #else | 2150 #else |
| 2151 TEST_F(WebFrameTest, FindInPageMatchRects) | 2151 TEST_F(WebFrameTest, FindInPageMatchRects) |
| 2152 #endif | 2152 #endif |
| 2153 { | 2153 { |
| 2154 registerMockedHttpURLLoad("find_in_page.html"); | 2154 registerMockedHttpURLLoad("find_in_page.html"); |
| 2155 registerMockedHttpURLLoad("find_in_page_frame.html"); | 2155 registerMockedHttpURLLoad("find_in_page_frame.html"); |
| 2156 | 2156 |
| 2157 FindUpdateWebFrameClient client; | 2157 FindUpdateWebFrameClient client; |
| 2158 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "find_in_page
.html", true, &client); | 2158 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "find_in_page
.html", true, &client); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2704 EXPECT_EQ(64, computeOffset(renderer, 1000, 1000)); | 2704 EXPECT_EQ(64, computeOffset(renderer, 1000, 1000)); |
| 2705 | 2705 |
| 2706 registerMockedHttpURLLoad("select_range_div_editable.html"); | 2706 registerMockedHttpURLLoad("select_range_div_editable.html"); |
| 2707 m_webView = createWebViewForTextSelection(m_baseURL + "select_range_div_edit
able.html"); | 2707 m_webView = createWebViewForTextSelection(m_baseURL + "select_range_div_edit
able.html"); |
| 2708 mainFrame = toWebFrameImpl(m_webView->mainFrame()); | 2708 mainFrame = toWebFrameImpl(m_webView->mainFrame()); |
| 2709 renderer = mainFrame->frame()->selection().rootEditableElement()->renderer()
; | 2709 renderer = mainFrame->frame()->selection().rootEditableElement()->renderer()
; |
| 2710 EXPECT_EQ(0, computeOffset(renderer, -1, -1)); | 2710 EXPECT_EQ(0, computeOffset(renderer, -1, -1)); |
| 2711 EXPECT_EQ(64, computeOffset(renderer, 1000, 1000)); | 2711 EXPECT_EQ(64, computeOffset(renderer, 1000, 1000)); |
| 2712 } | 2712 } |
| 2713 | 2713 |
| 2714 #if !OS(DARWIN) | 2714 #if !OS(MACOSX) |
| 2715 TEST_F(WebFrameTest, SelectRangeStaysHorizontallyAlignedWhenMoved) | 2715 TEST_F(WebFrameTest, SelectRangeStaysHorizontallyAlignedWhenMoved) |
| 2716 { | 2716 { |
| 2717 WebFrameImpl* frame; | 2717 WebFrameImpl* frame; |
| 2718 registerMockedHttpURLLoad("move_caret.html"); | 2718 registerMockedHttpURLLoad("move_caret.html"); |
| 2719 | 2719 |
| 2720 m_webView = createWebViewForTextSelection(m_baseURL + "move_caret.html"); | 2720 m_webView = createWebViewForTextSelection(m_baseURL + "move_caret.html"); |
| 2721 frame = (WebFrameImpl*)m_webView->mainFrame(); | 2721 frame = (WebFrameImpl*)m_webView->mainFrame(); |
| 2722 | 2722 |
| 2723 WebRect initialStartRect; | 2723 WebRect initialStartRect; |
| 2724 WebRect initialEndRect; | 2724 WebRect initialEndRect; |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3754 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h
tml", true, 0, &client); | 3754 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h
tml", true, 0, &client); |
| 3755 runPendingTasks(); | 3755 runPendingTasks(); |
| 3756 | 3756 |
| 3757 EXPECT_EQ(client.startLoadingCount(), 2); | 3757 EXPECT_EQ(client.startLoadingCount(), 2); |
| 3758 EXPECT_EQ(client.stopLoadingCount(), 2); | 3758 EXPECT_EQ(client.stopLoadingCount(), 2); |
| 3759 m_webView->close(); | 3759 m_webView->close(); |
| 3760 m_webView = 0; | 3760 m_webView = 0; |
| 3761 } | 3761 } |
| 3762 | 3762 |
| 3763 } // namespace | 3763 } // namespace |
| OLD | NEW |