| 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 } | 682 } |
| 683 | 683 |
| 684 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient
{ | 684 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient
{ |
| 685 public: | 685 public: |
| 686 virtual WebScreenInfo screenInfo() override { return m_screenInfo; } | 686 virtual WebScreenInfo screenInfo() override { return m_screenInfo; } |
| 687 | 687 |
| 688 WebScreenInfo m_screenInfo; | 688 WebScreenInfo m_screenInfo; |
| 689 }; | 689 }; |
| 690 | 690 |
| 691 class FakeCompositingWebViewClient : public FixedLayoutTestWebViewClient { | 691 class FakeCompositingWebViewClient : public FixedLayoutTestWebViewClient { |
| 692 public: | |
| 693 virtual bool enterFullScreen() override { return true; } | |
| 694 }; | 692 }; |
| 695 | 693 |
| 696 // Viewport settings need to be set before the page gets loaded | 694 // Viewport settings need to be set before the page gets loaded |
| 697 static void enableViewportSettings(WebSettings* settings) | 695 static void enableViewportSettings(WebSettings* settings) |
| 698 { | 696 { |
| 699 settings->setViewportMetaEnabled(true); | 697 settings->setViewportMetaEnabled(true); |
| 700 settings->setViewportEnabled(true); | 698 settings->setViewportEnabled(true); |
| 701 settings->setMainFrameResizesAreOrientationChanges(true); | 699 settings->setMainFrameResizesAreOrientationChanges(true); |
| 702 settings->setShrinksViewportContentToFit(true); | 700 settings->setShrinksViewportContentToFit(true); |
| 703 } | 701 } |
| (...skipping 6220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6924 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6922 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6925 | 6923 |
| 6926 // Neither should a page reload. | 6924 // Neither should a page reload. |
| 6927 localFrame->reload(); | 6925 localFrame->reload(); |
| 6928 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6926 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 6929 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6927 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 6930 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6928 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6931 } | 6929 } |
| 6932 | 6930 |
| 6933 } // namespace | 6931 } // namespace |
| OLD | NEW |