text: // Copyright 2020 The Chromium Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  /** @fileoverview Runs the Polymer v2 Nearby Share shared tests. */
  
  // Polymer BrowserTest fixture.
  GEN_INCLUDE(['//chrome/test/data/webui/polymer_browser_test_base.js']);
  
  GEN('#include "chrome/browser/browser_features.h"');
  GEN('#include "content/public/test/browser_test.h"');
  GEN('#include "services/network/public/cpp/features.h"');
  
  const NearbySharedBrowserTest = class extends PolymerTest {
    /** @override */
    get browsePreload() {
      return 'chrome://os-settings/';
    }
  
    /** @override */
    get featureList() {
      return {
        enabled: [
          'features::kNearbySharing',
          // required for linux-blink-cors-rel builder (post CQ)
          'network::features::kOutOfBlinkCors',
        ]
      };
    }
  
    /** @override */
    get extraLibraries() {
      return super.extraLibraries.concat([
        '../../test_util.js',
        'fake_nearby_share_settings.js',
      ]);
    }
  };
  
  
  /**
   * @extends {NearbySharedBrowserTest}
   */
  var NearbyOnboardingPageTest = class extends NearbySharedBrowserTest {
    /** @override */
    get browsePreload() {
      return super.browsePreload + 'shared/nearby_onboarding_page.html';
    }
  
    /** @override */
    get extraLibraries() {
      return super.extraLibraries.concat([
        'nearby_onboarding_page_test.js',
      ]);
    }
  };
  
  TEST_F('NearbyOnboardingPageTest', 'All', () => mocha.run());
  
  /**
   * @extends {NearbySharedBrowserTest}
   */
  var NearbyVisibilityPageTest = class extends NearbySharedBrowserTest {
    /** @override */
    get browsePreload() {
      return super.browsePreload + 'shared/nearby_visibility_page.html';
    }
  
    /** @override */
    get extraLibraries() {
      return super.extraLibraries.concat([
        'nearby_visibility_page_test.js',
      ]);
    }
  };
  
  TEST_F('NearbyVisibilityPageTest', 'All', () => mocha.run());
  