| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "wtf/text/CString.h" | 42 #include "wtf/text/CString.h" |
| 43 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
| 44 | 44 |
| 45 using testing::_; | 45 using testing::_; |
| 46 using testing::Mock; | 46 using testing::Mock; |
| 47 using testing::Return; | 47 using testing::Return; |
| 48 | 48 |
| 49 namespace blink { | 49 namespace blink { |
| 50 namespace { | 50 namespace { |
| 51 | 51 |
| 52 class MockWebFrameClient : public WebFrameClient { | 52 class MockWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 53 public: | 53 public: |
| 54 ~MockWebFrameClient() override { } | 54 ~MockWebFrameClient() override { } |
| 55 | 55 |
| 56 MOCK_METHOD0(userAgentOverride, WebString()); | 56 MOCK_METHOD0(userAgentOverride, WebString()); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class FrameLoaderClientImplTest : public ::testing::Test { | 59 class FrameLoaderClientImplTest : public ::testing::Test { |
| 60 protected: | 60 protected: |
| 61 void SetUp() override | 61 void SetUp() override |
| 62 { | 62 { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 EXPECT_TRUE(overrideUserAgent.equals(userAgent())); | 105 EXPECT_TRUE(overrideUserAgent.equals(userAgent())); |
| 106 Mock::VerifyAndClearExpectations(&webFrameClient()); | 106 Mock::VerifyAndClearExpectations(&webFrameClient()); |
| 107 | 107 |
| 108 // Remove the override and make sure we get the original back. | 108 // Remove the override and make sure we get the original back. |
| 109 EXPECT_CALL(webFrameClient(), userAgentOverride()).WillOnce(Return(WebString
())); | 109 EXPECT_CALL(webFrameClient(), userAgentOverride()).WillOnce(Return(WebString
())); |
| 110 EXPECT_TRUE(defaultUserAgent.equals(userAgent())); | 110 EXPECT_TRUE(defaultUserAgent.equals(userAgent())); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace | 113 } // namespace |
| 114 } // namespace blink | 114 } // namespace blink |
| OLD | NEW |