New issue
Advanced search Search tips

Issue 597954 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2016
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Compilation errors on creating mock WebContentsObserver with DidGetUserInteraction method

Project Member Reported by tmonius...@opera.com, Mar 25 2016

Issue description

This simple piece of code:


  #include "content/public/browser/web_contents_observer.h"
  #include "testing/gmock/include/gmock/gmock.h"
  #include "testing/gtest/include/gtest/gtest.h"

  class MockWebContentsObserver : public content::WebContentsObserver {
   public:
    explicit MockWebContentsObserver(content::WebContents* web_contents)
        : WebContentsObserver(web_contents) {}

    MOCK_METHOD1(DidGetUserInteraction, void(const blink::WebInputEvent::Type type));
  };

  TEST(FooTest, Bar) {
    MockWebContentsObserver observer(nullptr);
    EXPECT_CALL(observer, DidGetUserInteraction(testing::_));
  }


gives following compilation errors on Windows:


error C2220: warning treated as error - no 'object' file generated
warning C4373: 'MockWebContentsObserver::DidGetUserInteraction': virtual function overrides 'content::WebContentsObserver::DidGetUserInteraction', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
note: see declaration of 'content::WebContentsObserver::DidGetUserInteraction'
ninja: build stopped: subcommand failed.

 
Status: WontFix (was: Started)
Not an issue in current Chromium code. I'm closing this issue.

Sign in to add a comment