Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: third_party/polymer/PRESUBMIT.py

Issue 236733003: Remove the need for <polymer-selector> in the PDF plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/pdf/index.html ('k') | third_party/polymer/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/polymer/PRESUBMIT.py
diff --git a/third_party/polymer/PRESUBMIT.py b/third_party/polymer/PRESUBMIT.py
deleted file mode 100644
index bd661274cd589d7cd4f6653d6a91532c7c3de458..0000000000000000000000000000000000000000
--- a/third_party/polymer/PRESUBMIT.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2014 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.
-
-"""Chromium presubmit script for third_party/polymer.
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details on the presubmit API built into gcl.
-"""
-
-def _CheckVulcanizeWasRun(input_api, output_api):
- """Checks to make sure vulcanize has been run on polymer when it is
- changed."""
- version_tag = '// @version: '
- separator = input_api.os_path.sep
- cwd = input_api.PresubmitLocalPath() + separator
- polymer_js = cwd + 'polymer' + separator + 'polymer.js'
- polymer_vulcanized_js = cwd + 'vulcanized' + separator + 'polymer-elements.js'
-
- version = ''
- with open(polymer_js, 'r') as f:
- for line in f:
- if version_tag in line:
- version = line.split(' ')[2].strip()
- if (not version):
- return [output_api.PresubmitError('Expected to find an @version tag in: ' +
- polymer_js + ' but did not.')]
- vulcanized_version = ''
- with open(polymer_vulcanized_js, 'r') as f:
- for line in f:
- if version_tag in line:
- vulcanized_version = line.split(' ')[2].strip()
-
- if (not vulcanized_version):
- return [output_api.PresubmitError('Expected to find an @version tag in: ' +
- polymer_vulcanized_js + ' but did not.')]
- if (vulcanized_version != version):
- return [output_api.PresubmitError('The vulcanized version of polymer (' +
- polymer_vulcanized_js + ') has version ' + vulcanized_version +
- ' while the original version (' + polymer_js + ') has version ' +
- version + '. You probably need to run vulcanize.py in ' + cwd + '.')]
-
- return []
-
-def _CommonChecks(input_api, output_api):
- """Checks common to both upload and commit."""
- results = []
- results.extend(_CheckVulcanizeWasRun(input_api, output_api))
- return results
-
-def CheckChangeOnUpload(input_api, output_api):
- results = []
- results.extend(_CommonChecks(input_api, output_api))
- return results
-
-
-def CheckChangeOnCommit(input_api, output_api):
- results = []
- results.extend(_CommonChecks(input_api, output_api))
- return results
« no previous file with comments | « chrome/browser/resources/pdf/index.html ('k') | third_party/polymer/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698